package com.mengtian_tech.tju.dataquery.api.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import com.mengtian_tech.tju.dataquery.api.util.SessionUtil;


public class BaseController {
	
	
	
	public String getCurrentStaffId() {
		return 	SessionUtil.getUser();
	}
	
 
	
	public HttpServletRequest getRequest() {
		 HttpServletRequest requests = ((ServletRequestAttributes)RequestContextHolder.currentRequestAttributes())
				 .getRequest();
		 return requests;
	}
	
	public String getParam(String name) {
		return getRequest().getParameter(name);
	}
}
